﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using EkStudio.com.bean.xml.Unit;
using System;

namespace EkStudio.com.bean.xml.BillModule
{
    public class BillModuleRoot:BillObjectInterface
    {


        [Xml]
        public string Caption
        {
            get
            {
                return caption;
            }

            set
            {
                caption = value;
            }
        }

        [Xml]
        public string Key
        {
            get
            {
                return key;
            }

            set
            {
                key = value;
            }
        }
        
        [Xml]
        public string LanguageTexts
        {
            get
            {
                return languageTexts;
            }

            set
            {
                languageTexts = value;
            }
        }
        [Xml]
        public string RootVersion
        {
            get
            {
                return rootVersion;
            }

            set
            {
                rootVersion = value;
            }
        }
        [Xml("package")]
        public string JavaPackage
        {
            get
            {
                return javaPackage;
            }

            set
            {
                javaPackage = value;
            }
        }
        [Xml]
        public string GroupList
        {
            get
            {
                return groupList;
            }

            set
            {
                groupList = value;
            }
        }
        [Xml]
        public bool Compress
        {
            get
            {
                return compress;
            }

            set
            {
                compress = value;
            }
        }
        [XmlElement("behaviorProperties")]
        public BillModuleBehavior Behavior
        {
            get
            {
                return behavior;
            }

            set
            {
                behavior = value;
            }
        }
        [XmlElement("advancedProperties")]
        public BillModuleAdvanced Advanced
        {
            get
            {
                return advanced;
            }

            set
            {
                advanced = value;
            }
        }

        [XmlElement("ownerProperties")]
        public BillModuleOwner Owner
        {
            get
            {
                return owner;
            }

            set
            {
                owner = value;
            }
        }
        [XmlElement]
        public BillUiFormatModuleLinkers Linkers
        {
            get
            {
                return linkers;
            }

            set
            {
                linkers = value;
            }
        }
        [XmlTransient]
        public object ParentBean
        {
            get
            {
                return null;
            }

            set
            {
                
            }
        }

        

        public object Clone()
        {
            BillModuleRoot clone = new BillModuleRoot();
            clone.Key = key;
            clone.Caption = caption;
            clone.LanguageTexts = languageTexts;
            clone.RootVersion = rootVersion;
            clone.GroupList = groupList;
            if (behavior != null)
            {
                clone.Behavior = (BillModuleBehavior)Behavior.Clone();
            }
            if(advanced != null)
            {
                clone.Advanced = (BillModuleAdvanced)advanced.Clone();
            }
            if (owner != null) { clone.Owner = (BillModuleOwner)owner.Clone(); }
            if (linkers != null) { clone.Linkers = (BillUiFormatModuleLinkers)linkers.Clone(); }
            return clone;
        }


        private string caption;

        private string key;

        private string languageTexts;

        private string rootVersion = BeanUtil.VERSION;

        private string javaPackage = "";

        private string groupList = "";

        private bool compress = true;

        private BillModuleBehavior behavior;

        private BillModuleAdvanced advanced;

        private BillModuleOwner owner;

        private BillUiFormatModuleLinkers linkers = null;
    }
}
